<%@page import="study.itwill.team5.admin.AdminItem"%>
<%@page import="study.itwill.jsp.WebHandler"%>
<%@page import="java.util.ArrayList"%>
<%@page import="study.itwill.common.DBHandler"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page trimDirectiveWhitespaces="true"%>
<%@ include file="../session.jsp"%>
<%@ include file="../dbcon.jsp"%>
<!DOCTYPE html>
<html lang="ko">
<head>
<%@ include file="../head.jsp"%>
</head>
<body>
	<%@ include file="../menu.jsp"%>
	<div class="container">
		<div class="page-header">
			<h1>
				신규 민박 도시 추가 - <small>새로운 민박 도시를 추가하세요.</small>
			</h1>
		</div>

		<form id="frmHouseCityAdd" class="form-horizontal" role="form"
			method="post" action="addHouseCityOk.jsp">
			<fieldset>

				<!-- 입력양식 -->
				<div class="form-group">
					<label for="city_name" class="col-md-2 control-label">도시이름</label>
					<div class="col-md-10">
						<input type="text" class="form-control" id="city_name"
							placeholder="도시이름을 입력하세요" name="city_name" autofocus>
					</div>
				</div>

				<div class="form-group">
					<div class="col-md-offset-2 col-md-10">
						<div class="row">
							<div class="col-md-6">
								<button type="submit" class="btn btn-primary btn-block">저장하기</button>
							</div>
							<div class="col-md-6">
								<button type="reset" class="btn btn-warning btn-block">다시작성</button>
							</div>
						</div>

					</div>
				</div>

			</fieldset>
		</form>
	</div>
	<% db.disconnect(); %>
	<!-- Javascript -->
	<script src="/Team-Project/assets/js/jquery.js"></script>
	<script src="/Team-Project/assets/js/bootstrap.min.js"></script>
	<!-- 형식검사 클래스 참조 -->
	<script src="/Team-Project/assets/js/string.js"></script>
	<!-- 구현부분 -->
	<script type="text/javascript">
		// jquery main()
		$(function() {
			$("#frmHouseCityAdd").submit(function() {
				
				// 도시이름 입력여부 검사
				if (!$("input[name='city_name']").val().isValue()) {
					alert("도시이름을 입력하세요.");
					$("input[name='city_name']").focus();
					return false;
				}
				
			});
		});
	</script>

</body>
</html>